package com.ideal.manage.esms.bean.project;

import com.ideal.manage.esms.bean.project.AccountProperty;
import com.ideal.manage.esms.bean.project.EquipmentManage;
import com.ideal.manage.esms.bean.project.ProjectManage;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * Created By Dai On 2018/5/18
 * Remark: 系统监控-台账信息存储表
 */
@Entity
@Table(name = "esms_stadning_book_info")
public class StadningBookInfo {
    @Id
    @GeneratedValue(generator = "uuid")
    @GenericGenerator(name = "uuid", strategy = "uuid")
    private String id;              //ID

    @ManyToOne
    @JoinColumn(name = "project_id")
    private ProjectManage project;  //项目ID

    @ManyToOne
    @JoinColumn(name = "equipment_id")
    private EquipmentManage equipment;//设备ID

    @ManyToOne
    @JoinColumn(name = "stadning_id")
    private AccountProperty account;//台账ID

    private String val;             //值
    private Date createTime;        //创建时间
    private Integer isValid = 1;    //是否有效

    @Transient
    private String timeStr;         //时间字符串
    @Transient
    private Double sumVal;          //统计结果

    public Double getSumVal() {
        return sumVal;
    }

    public void setSumVal(Double sumVal) {
        this.sumVal = sumVal;
    }

    public String getTimeStr() {
        return timeStr;
    }

    public void setTimeStr(String timeStr) {
        this.timeStr = timeStr;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public ProjectManage getProject() {
        return project;
    }

    public void setProject(ProjectManage project) {
        this.project = project;
    }

    public EquipmentManage getEquipment() {
        return equipment;
    }

    public void setEquipment(EquipmentManage equipment) {
        this.equipment = equipment;
    }

    public AccountProperty getAccount() {
        return account;
    }

    public void setAccount(AccountProperty account) {
        this.account = account;
    }

    public String getVal() {
        return val;
    }

    public void setVal(String val) {
        this.val = val;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getIsValid() {
        return isValid;
    }

    public void setIsValid(Integer isValid) {
        this.isValid = isValid;
    }
}
